<?php

namespace addons\alidayu\admin\controller;

use app\AppService;
use app\Controller;
use think\facade\Request;

class Index extends Controller
{
    /**
     * 阿里大鱼配置
     */
    public function config()
    {
        if ($this->isAjax())
        {
            $request = Request::param();
            $data = $request['form'];
            AppService::setConf('addon_alidayu', 'alidayu', $data);
            return $this->success();
        }
        $config = AppService::getConf('addon_alidayu', 'alidayu');
        return $this->view('', ['data' => $config]);
    }
}
